package nju.bean.meeting.UML;

import java.awt.Graphics;
import java.awt.Image;

import javax.swing.JPanel;

@SuppressWarnings("serial")
public class UmlDrawer extends JPanel {
	
	private Image image;
	
	public UmlDrawer(Image bi,int w,int h){
		image = bi;
		this.setSize(w, h);
	}
	
	public void attachImage(Image image){
		this.image  = image;
		this.validate();
	}
	
	@Override
	public void paintComponent(Graphics g){
		super.paintComponent(g);
		g.drawImage(image, 0, 0, getWidth(), getHeight(), null);
	}
}
